package test.jusfy.com.myapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import android.widget.Toast;

public class DetailActivity extends AppCompatActivity {

    TextView tvId;
    TextView tvlen;
    TextView tvloc;
    TextView tvmp3loc;
    TextView tvmp3len;
    TextView tvsongname;
    TextView tvlanguage;
    TextView tvsinger;
    TextView tvsearch;
    TextView tvM;
    TextView tvL;
    TextView tvsearchsinger;

    TextView tvmidiname;
    TextView tvmp3name;
    TextView tvmtvname;
    TextView tvdbpath;
    TextView tvensongname;

    TextView tvensingername;
    TextView tvencomposer;
    TextView tvenwriter;
    TextView tvsearchcomposer;




    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);

        initViews();
        SongTable songTable = (SongTable) getIntent().getSerializableExtra("songtable");

        tvId.setText(songTable.getId());
        tvloc.setText(songTable.getLoc());
        tvlen.setText(songTable.getLen());
        tvmp3loc.setText(songTable.getMp3loc());
        tvmp3len.setText(songTable.getMp3len());
        tvsongname.setText(songTable.getSongname());
        tvlanguage.setText(songTable.getLanguage());
        tvsinger.setText(songTable.getSinger());
        tvsearch.setText(songTable.getSearch());
        tvM.setText(songTable.getM());
        tvL.setText(songTable.getL());
        tvsearchsinger.setText(songTable.getSearchsinger());
        tvmidiname.setText(songTable.getMidiname());
        tvmp3name.setText(songTable.getMp3name());
        tvmtvname.setText(songTable.getMtvname());
        tvdbpath.setText(songTable.getDbpath());
        tvensongname.setText(songTable.getEnsongname());
        tvensingername.setText(songTable.getEnsingername());
        tvencomposer.setText(songTable.getEncomposer());
        tvenwriter.setText(songTable.getEnwriter());
        tvsearchcomposer.setText(songTable.getSearchcomposer());
    }

    private void initViews() {
        tvId = (TextView) findViewById(R.id.tv_deailId);
        tvloc = (TextView) findViewById(R.id.tv_deailloc);
        tvlen = (TextView) findViewById(R.id.tv_deaillen);
        tvmp3loc = (TextView) findViewById(R.id.tv_deailmp3loc);
        tvmp3len = (TextView) findViewById(R.id.tv_deailmp3len);
        tvsongname = (TextView) findViewById(R.id.tv_deailsongname);
        tvlanguage = (TextView) findViewById(R.id.tv_deaillanguage);
        tvsinger = (TextView) findViewById(R.id.tv_deailsinger);
        tvsearch = (TextView) findViewById(R.id.tv_deailsearch);
        tvM = (TextView) findViewById(R.id.tv_deailM);
        tvL = (TextView) findViewById(R.id.tv_deailL);
        tvsearchsinger = (TextView) findViewById(R.id.tv_deailsearchsinger);

        tvmidiname = (TextView) findViewById(R.id.tv_deailmidiname);
        tvmp3name = (TextView) findViewById(R.id.tv_deailmp3name);
        tvmtvname = (TextView) findViewById(R.id.tv_deailmtvname);
        tvdbpath = (TextView) findViewById(R.id.tv_deaildbpath);
        tvensongname = (TextView) findViewById(R.id.tv_deailensongname);
        tvensingername = (TextView) findViewById(R.id.tv_deailensingername);
        tvencomposer = (TextView) findViewById(R.id.tv_deailencomposer);
        tvenwriter = (TextView) findViewById(R.id.tv_deailenwriter);
        tvsearchcomposer = (TextView) findViewById(R.id.tv_deailsearchcomposer);
    }
}
